package com.springinaction.chapter01.knight;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;

public class Test {

	public static void main(String[] args) {
		
	    BeanFactory factory = new XmlBeanFactory(new FileSystemResource("knight.xml"));
		Knight knight = (Knight) factory.getBean("knight");

		try {
			knight.embarkOnQuest();
		} catch (QuestFailedException e) {
			e.printStackTrace();
		}
	}
}
